home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
FSIZE.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
1KB
|
51 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_FSize( xFile ) --> nFileSize
PARAMETERS:
xFile: file name *OR* handle
SHORT:
Determine the size of a file.
DESCRIPTION:
_FSize() returns the size of the specified file in bytes.
If xFile is of type char, then _FSize() assumes a file name of a file TO
BE OPENED. If the file is already open, then pass the file handle returned
by a previous call to Clipper's fopen() function.
If you specify a file handle of an already open file, the file pointer
is reset to it's original position when _FSize() returns.
If you specify a file handle that is not valid, the result is unpredictable.
If you specify a file that does not exist, -1 is returned.
If you fail to specify xFile, the return value is -1.
If you specify a file name that cannot be opened, the return value is -1.
NOTE:
_FSize() is a legacy function - written before directory() was introduced in
version 5.x of Clipper.
Nevertheless, _FSize() is less trouble, doing away with the need to create
an array simply to get the file size of a single file.
EXAMPLE:
EXAMPLE: LOCAL t := _FSize('TEST.DAT')
Result: t = 50887 //size of TEST.DAT
******************************************************************************/